<template>
  <div>
    <h3>用户分布</h3>
    <!-- <el-card>
      <div id="chart1"></div>
    </el-card>
    <el-card>
      <div id="chart2"></div>
    </el-card>
    <el-card>
      <div id="chart3"></div>
    </el-card> -->
    <MapEchart :usercity="city"></MapEchart>
    <!-- <el-card>
      <div id="chart3"></div>
    </el-card>
    <el-card>
      <div id="chart4"></div>
    </el-card> -->
  </div>
</template>

<script>
import httpApi from "@/http";
// import * as echarts from "echarts";
import MapEchart from '@/components/MapEchart'

export default {
  components: {
    MapEchart
  },
  data() {
    return {
      city: [],
    };
  },
  methods: {
    infocity() {
      httpApi.commpleApi.querycitycount().then((res) => {
        console.log("城市分布", res);
        this.city = res.data.data.result;
      });
    },
  },
  mounted() {
    this.infocity();
  },
};
</script>

<style lang="scss" scoped>
.data-view {
  width: 100%;
  display: flex;
  justify-content: space-between;
  flex-direction: column;
}
.el-card {
  width: 49%;
}
#chart1,
#chart2,
#chart3 {
  height: 500px;
}
</style>